﻿/// <reference path="../js/jquery.js" />
/// <reference path="../js/validated5.js" />
/// <reference path="../js/custom.js" />
/// <reference path="../js/webviewadapter.js" />
/// <reference path="../js/sexylightbox.js" />

var validate=new Validated();
validate.rules={
    "realname": {
        "data": /^.{2,20}$/,
        "complete": "",
        "error": "请输入真实姓名",
        "normal": "请输入真实姓名",
        "required": true
    },
    "telphone": {
        "data": Validated.phonerule,
        "complete": "",
        "error": "请输入手机号码",
        "normal": "请输入手机号码",
        "required": true
    },
    "zuoji": {
        "data": Validated.fixedphonerule,
        "complete": "",
        "error": "请输入座机号码",
        "normal": "请输入座机号码,区号+号码",
        "required": false
    },
    "gongsi": {
        "data": /^.{2,30}$/,
        "complete": "",
        "error": "请输入公司名称",
        "normal": "请输入公司名称",
        "required": false
    },
    "bumen": {
        "data": /^.{2,20}$/,
        "complete": "",
        "error": "请输入部门名称",
        "normal": "请输入部门名称",
        "required": false
    },
    "zhiwu": {
        "data": /^.{2,20}$/,
        "complete": "",
        "error": "请输入职务名称",
        "normal": "请输入职务名称",
        "required": false
    },
    "url": {
        "data": /^http:\/\/[\w\.]{2,30}$/,
        "complete": "",
        "error": "请输入公司网址，以http://开头",
        "normal": "如：http://www.rsseasy.com",
        "required": false
    }
}
validate.focus().blur();
validate.trigger("#vcardbtn","click")

$("#url").keyup(function()
{
    if(this.value.match("http://.+/$"))
    {
        this.value=this.value.substring(0,this.value.length-1)
    }
});

$("#erweima").click();